# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=piper
pkgver=0.7
pkgrel=2
pkgdesc='GTK application to configure gaming mice'
arch=('any')
url='https://github.com/libratbag/piper'
license=('GPL')
depends=('python' 'python-gobject' 'libratbag' 'python-evdev' 'python-lxml' 'python-cairo')
makedepends=('git' 'meson' 'flake8' 'appstream')
validpgpkeys=('3DCE51D60930EBA47858BA4146F633CBB0EB4BF2'  # Filipe Laíns (FFY00) <lains@archlinux.org>
              '3C2C43D9447D5938EF4551EBE23B7E70B467F0BF'  # Peter Hutterer (Who-T) <office@who-t.net>
              '2F2670AC164DB36F'                          # Benjamin Tissoires <benjamin.tissoires@gmail.com>
              'BB45B0B3FF561BDBD45EE8A9B35B49EA5D563EFE') # stephanlachnit@protonmail.com <stephanlachnit@protonmail.com>
source=("git+$url#tag=$pkgver?signed")
sha512sums=('SKIP')

prepare() {
  cd $pkgname

  # Remove install script
  # This is handled by pacman hooks
  sed -i "/meson.add_install_script('meson_install.sh')/d" meson.build
}

build() {
  mkdir $pkgname/build
  cd $pkgname/build

  arch-meson ..

  ninja
}

package() {
  cd $pkgname/build

  DESTDIR="$pkgdir" ninja install
}
